/* Layout */
import Layout from '@/layout'

export const constantRoutes = [{
    path: '/login',
    component: () => import('@/views/login/index'),
    hidden: true
  },

  {
    path: '/404',
    component: () => import('@/views/404'),
    hidden: true
  },

  {
    path: '/',
    component: Layout,
    redirect: '/dashboard',
    children: [{
      path: 'dashboard',
      name: 'Dashboard',
      component: () => import('@/views/dashboard/index'),
      meta: {
        title: 'Dashboard',
        icon: 'dashboard'
      }
    }]
  },

  {
    path: '/acl',
    name: 'Acl',
    component: Layout,
    redirect: '/acl/user/list',
    meta: {
      title: '权限管理',
      icon: 'dashboard'
    },
    children: [{
        path: 'user/list',
        name: 'User',
        component: () => import('@/views/acl/user'),
        meta: {
          title: '用户管理'
        },
      },
      {
        path: 'role/list',
        name: 'Role',
        component: () => import('@/views/acl/role'),
        meta: {
          title: '角色管理'
        }
      }
    ]
  },


  {
    path: '/product',
    name: 'Product',
    component: Layout,
    redirect: '/product/attr/list',
    meta: {
      title: '商品管理',
      icon: 'dashboard'
    },
    children: [{
        path: 'like/list',
        name: 'Like',
        component: () => import('@/views/product/like'),
        meta: {
          title: '猜你喜欢'
        }
      },
      {
        path: 'movie/list',
        name: 'Movie',
        component: () => import('@/views/product/movie'),
        meta: {
          title: '电影管理'
        }
      },
      {
        path: 'cart/list',
        name: 'Cart',
        component: () => import('@/views/product/cart'),
        meta: {
          title: '订单管理'
        }
      }
    ]
  },

  // 404 page must be placed at the end !!!
  {
    path: '*',
    redirect: '/404',
    hidden: true
  }
]
